#include <stdio.h>
#include <string.h>

int main()
{	
	FILE *fp;
	char user0[64] = "user";
	char user[64];
	char f0[128] = "/etc/vsftpd/vuser_conf";
	char f[128];
	char content0[256] = "local_root=/home/ftp";
	char content[256];
	const char content2[1024] = "write_enable=YES\nanon_umask=022\nanon_world_readable_only=NO\nanon_upload_enable=YES\nanon_mkdir_write_enable=YES\nanon_other_write_enable=YES";
	for(int i = 0; i < 100; i ++) 
	{
		snprintf(user, sizeof(user), "%s%d", user0, i + 1);
		snprintf(f, sizeof(f), "%s/%s", f0, user);
		fp = fopen(f, "wb");
		snprintf(content, sizeof(content), "%s/%s\n", content0, user);
		fwrite(content, strlen(content), 1, fp);
		fwrite(content2, strlen(content2), 1, fp);
	}

	return 0; 
}
